<?php


namespace app\webs\controller;


use app\common\controller\Api;
use app\webs\model\LangModel;

class Lang extends Api
{
    public function index()
    {
        $index = LangModel::with(['child'])

            ->order('id','DESC')
            ->where('switch',1)
            ->field('id,title,image,remark,label,create_time')
            ->select();
        if (!$index){
            $this->error('查询失败');
        }
        $this->success('查询成功',$index);
    }


}